home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
misc
/
minilise.lha
/
minilise
/
lise.doc
< prev
next >
Wrap
Text File
|
1993-03-30
|
59KB
|
1,357 lines
Documentation for LISE,
-----------------------
the on Line Interactive Spectra Examination
Environment for multitasking Computers.
A word about LISE and OTTO
--------------------------
Both programs were develloped from physicists in the Hyperfine group
at the Hahn - Meitner - Institute in Berlin.
The older Program, OTTO (after Otto Hahn), was written by Mathias Menningen.
The intention of OTTO was to provide a universal program for
analysing 1-dim spectra and giving pictures, ready for publication.
It includes a very good multi parameter fit routine, and many
specialized functions for Moessbauer, PAC and PAD.
This Program has proofed very usefull when analysing data, which have been
allready collected.
But if you are collecting data, you want to have an On Line
analysis, and you want to manage auxillary devices and spectra files
simultaneusly. After a long time of incremental devellopment, OTTO
has become so big, that Linking time will prevent every programm devellopment.
Furthermore, the program was written in FORTRAN, and uses lots of
special libraries.
After all, there are implementations for the IBM PC (scaled down because
of memory problems), the ATARI ST, and DEC VAXes under VMS,
each having different sources and libraries. From these three Versions,
only the VAX version can be considerd really, since the other computers
are unable to run Multitasking.
After Mathias has left the group, there was nobody, who could manage to
port the OTTO to our UNIX Workstation.
So the Idea came up, to create a new program, which should fulfill the
following conditions:
1) It should allow for easy expansion.
2) It should work together with Hardware controlling tasks.
3) It should be able to do Analysis without any human help,
4) It should be as close as possible to the known syntax from OTTO.
So I develloped LISE (after Lise Meitner).
Its itention is a little bit different from OTTO, so that both programs
can be considered complementary, though both of them are closely related.
OTTO is best for final analysis, giving correct error values and producing
pictures ready for publishing.
LISE is best for On Line Analysis, giving results without huge pre analysis,
(finding time 0 , finding correct background...).
gives possibility to export pictures to other programs, for further
modification and including in DTP programs.
UPDATE TO THIS:
---------------
After about 3 years of devellopment LISE has reached a level, where
you can also get good Fit results and good graphical output from
LISE (general multiparameter Fits were introduced on the first
public release in December 1992, increased graphical resolution and
the Hershey vector fonts are new to Release 2.0)
So there are only some minor restrictions left (some special theory
functions). At this time a port of OTTO to UNIX seems to be
completely senseless, since LISE can do this job much better.
Nevertheless, for some special functions you may wish to use
OTTO on the VAX.
Introduction
-------------
LISE is not a single program, but a collection of programs, which may
be called from the system command line interface. This allows for
writing macro procedures in the script language of your computer
(preferably the Korn-shell on UNIX and Amiga computers, but also the
Rexx language on OS/2 and the Amiga), thus having
access to all system features (as for example the cron utility on
UNIX and Amiga computers) and saving your time, by not teaching you
another lousy macro language. The other advantage of this concept is,
that you may use all routines from within your own programs via a
system call.
And last, but not least, this concept enables you to add and modify
programs in a very easy way.
To enable a beginner to write programs for LISE, the spectra format
was kept so simple, but still flexible, that it is possible to use
pure ASCII input and output to access spectra files (but it is recommended,
that you use binary formats, because loading time is much faster and
Diskspace is saved). (There is another good reason for implementing
an ASCII format: It makes transport of data between different processors
very simple.)
I. Basics
-----------
spectra arrays are simply files on your disk. There are normally 3 related
files, which contain the data (*.spc) the corresponding error values (*.err)
and an optional nonlinear time axis (*.tim).
If there is no .tim array, then the internally stored calibration factor
is used. Error spectra are normally generated automatically, when the input
spectra have pure statistical (sqrt(n)) errors.
Spectra may be specyfied as whole spectrum by just giving the name
(e.g.:
ksh> ash myspectrum
)
If you just want to use a part of the spectrum you can use the "[" and "]"
to enclose the range, where the starting channel is separated by ":"
from the last channel.
(e.g.:
ksh> ash myspectrum[123:234]
)
The spectrum must allways be the first parameter !
If no spectrum is specified, it is expected to be "piped" to stdin !
Output goes allways to stdout (if not graphical of course) if it
is not explicitly redirected by the "-o filename" option !
You can allways get help on the routine you want to use by specifying
the "-h" or "-help" option.
The PAC and PAD spectra arrangement is stored in the file "global.def"
The actual time calibration factor is stored in "tica.all"
II. Files needed for LISE:
---------------------------
1) Programms
a. graphic primitives
pag.c used to erase the tektronix screen
vect.c routine to draw vectors from the shell
point.c plot a point (circle, triangle...)
tpo.c print text on screen. (TyPe Origin).
ash.c plotting spectrum with axis (Axis and SHow)
cur.c asking for cursor position
rmtek.c remove tektronix screen.
hco.c make a hardcopy of the tektronix screen.
b. spectra analysis
stype.c typing the contents of a spectrum
tcal.c makes a time calibration
fprompt.c finding prompt peak positions
four.c Fourieranalysis of spectrum
pacsplit.c splits an 8K spectrum into 2 1K spectra.
rvt.c calculates the ratio function of two spectra
Here we use the PAD ratio function !
rvt2.c PAC ratio function !
nmrrvt.c Special asymmetrie function for Beta-NMR
linfit.c Polynom and linear function fit to data
expfit.c exponential fit, based on linear regression,
making special fit for best background.
fit.c general purpose multiparameter fit
examplefn.c example external fit function
example.prm fit parameters for examplefn
fitfnback.c external fit function for Background (quadr.)
fitfnback.prm fit parameters for background
fitfn4freq.c external fit function for up to four
frequencies with 1st harmonic.
fitfn4freq.prm fit parameters for cos-fit
fitfnwkk.c external fit function for combined interaction.
fitfnwkk.prm fit parameters for combined interaction
c. spectra manipulation
genspc.c generates an artificial spectrum.
mspc.c modifies an existing spectrum.
(shifting and compressing)
ccalc.c floating point calculator
scalc.c spectra calculator (formular parser)
lbn.c changes the time calibration factor
of all spectra specified.
d. miscellaneous
tekdaemon.c A programm, which reads graphic input
from a pipe, and sends it to the actual
tektronix emulation.
It also may be responsable for hardcopies
on some systems.
tekamiga.c The graphics communications programm
for the amiga version of LISE.
rmtek.c Remove graphics daemon from system.
You should allways use this programm before
logging out. If you leave the system without
removing the tekdaemon this way, you must
remove the graphic pipe by your own before
attempting to run the tekdaemon again.
vka.c read a spectrum from the halder vka and
create corresponding error and time arrays
Also does some other communications.
halderserv.c Another communication programm for the
Halder vka.
mca.c Reading Spectra from the MANY 86 MCA on
the Amiga. Includes all other communication.
MCAah.c Window oriented Multi Channel Analyser
program (not only) for the MANY 86 MCA.
It provides Life Display and some more
complex features. (Amiga only)
auger.c Makes one Auger scann and reads the Spectrum.
cio.c CESSNA format conversion program.
Limited to 25 Spectra and Integer !
plotio.c Amiga Multiplot conversion program.
jcampio.c JCAMP format conversion program.
2) includefiles
/src/lise/strigs.h some string handling functions
/src/lise/spec.h simple spectra i/o routines,
readspec(), writespec(),
and option string parsing: checkopt().
/src/lise/gfx.h graphic primitives:
tekopen(), vectoa(), posita(),
gfxtext(), gfxflush()...
/src/lise/gfxamiga.h the same definitions for the Amiga Version
of LISE.
/src/lise/auxcfg.h reads the auxillary configuration file
/dev/Aux_Config to get the device
addresses , error handler and some
specific information.
filedescriptor=auxopen("entryname");
3) shell scripts
lise lise startup definitions
pas pag ; ash... (store parameters)
pad pag ; ash with last parameters
adi ash with last parameters
dis ash -d with last parameters
dpeak display around peaks (1-4)
dpeak2 display around peaks (5-8)
4) menue files
/usr/lib/X11/bitmaps/lise The LISE icon in the control panel
/usr/lib/X11/helpfiles/lise The help message for this icon
/usr/lib/X11/app-defaults/XCtrl (has been changed)
/usr/lib/X11/app-defaults/OnLine The OnLine pushbutton menu
/usr/lib/X11/app-defaults/VKA The VKA pushbutton menu
/src/mdl/lise.mdl Lise Main Menu
/src/mdl/specdef.mdl Menu for spectra definition
(specialized global.def editor)
/src/mdl/liseprompt.mdl Menu to find prompt peaks
/src/lise/liservt.mdl Menu to start ratio function
/src/mdl/expfit.mdl Menu for Exp function fit
/src/mdl/xfit.mdl Multi parameter fit menu
5) other files
6) dependencies
*.spc spectra files (data)
*.err absolute errors
*.tim calibrated time
*.def peak positions and detektor positions
generated by fprompt.c
Must be modified before calling pacsplit.c
*.prm fit parameter files
/src/lise/Aux_Config Text file containing description of
auxillary devices.
!! /src/lise/stroke.fnt The old Vector font format is not accepted
in LISE 2.0. Therefore this font is
obsolete now.
/src/lise/font/*.chr These are the Hershey fonts for LISE
in the famous Borland (TURBO compilers)
compatible format (LSB/MSB).
tica.all Time calibration factor
as generated by tcal
global.def peak positions and detektor positions
as generated by fprompt. This file
will be read by pacsplit.c if no
*.def file exists
/tmp/gcursor is generated by the tekdaemon
to tell gfx.h where the cursor is.
/tmp/ashbdry is generated by ash.c to store the
actual boundaries for cur.c
/tmp/tek.pipe* graphical communication channel
III. Implementation notes.
--------------------------
0. Update info 2.0
------------------
The following features are new to LISE 2.0 (your benefits):
1. Increased graphical resolution conforming to the enhanced
Tektronix vectorgraphic standard (4096 X 4096)
2. The Hershey vector fonts
3. Enhanced configuration options in Aux_Config
5. Portable Binary float format
6. Some new options to the ASH command
7. Some metacharacters to select sub/super- script and greek characters.
Implications from 1. , 2. and 3. are (your work):
1. Scripts using Font size and Tektronix coordinates
will have to be rewritten.
Coordinates have to be multiplied by 4
2. Any modifications to the old stroke font are obsolete.
The old stroke font can not be used with LISE 2.0
3. You have to change the configuration in Aux_Config again.
Look at special chapter in this document.
1. General:
-----------
1. System requirements:
You'll need a UNIX Workstation with X11 running or at
least one additional Tektronix terminal for graphic
output.
The Amiga Version may need a 68881/2 FPU (I have not
tested it without coprocessor, but it was compiled with the
IEEE option, so that it may not run without FPU !)
You'll need further on: >1 MB Chip RAM >2 MB Fast RAM
Any Harddisk with >3 MB free Diskspace
Interlace Workbench (with any Deinterlace card)
2. Buffer adjustment
There is one environment variable in order to change
the spectra length used by all LISE progs:
MAXSPCLEN contains the maximum number of channels
of your spectra
(The variable TEKBUFSIZ is obsolete in LISE 2.0, since
its function is now well done by Aux_Config)
If this variable is not set, default values (16k data) are taken.
Type "ash -h" to get information on the default spectra length
and "tekdaemon -h" to get information on the vector buffer.
If you have a small system (Amiga 500) you should adjust this
Variable. (In the Amiga Version you may need to set BOTH
types of environment variables, the "new" env:MAXSPCLEN
and the "old" MANX and ARP style variables ! The Amiga
Version will have the command LISESET to do this)
You may also whish to adjust the Vector buffer for the
Graphic display. This can be done in the Aux_Config file.
If you have a small system it may help to specify a file name
instead of a buffer size. Then this file will be taken for
buffering (terribly slow)
2. UNIX
---------
After copying the sources to your lise directory, try compiling the whole stuff
using make. You can also try to compile individual files using the >mklise< script.
You should add your lise directory to your default PATH environment variable and
also set the environment variable LISEPRG to the name of your lise directory.
Copy the correct >Aux_Config< file to your lise and $HOME directory. There are
different configuration files for UNIX and Amiga ! This file must be named
>Aux_Config< on your computer.
First try running the >tekdaemon< program from a tektronix grafik terminal
(xterm -T), then try some graphic primitives like >point 100 100 -crf 20.
If this fails, inspect the configuration file >Aux_Config<. You should put a copy
of this file to your $HOME directory and make any modifications on this copy, since
it will be searched first.
Check write permissions for the graphic pipes.
If the basic graphics are working you can try to plot the demospectrum using
>ash *.spc -v< (I don't know, which spectrum I put on the distribution disk, but it
has the suffix .spc) If >ash< don't print any axis numbers, check the file
>$LISEPRG/fonts/trip.chr< which contains the Vector font description.
Adjust the printer driver primitive in Aux_Config (see separate section).
Try spectra manipulation using >scalc<
If everything is properly intalled, you should not need to run the tekdaemon
explicitly (at least on X-Window machines). The Tektronix emulation should
come up automatically, if you request any graphics output. If this is not
the case, check the file >gfx.h< for the calling of >tekdaemon<. check, if the
environment variable $LISEPRG is set correctly.
You must allways use >rmtek< to remove the graphic daemon, or you will have
a graphic pipe remaining, which disables running of tekdaemon next time you
try to make graphics. In this case try to remove the pipes manually with the
command >rm /tmp/tek*<
3. Amiga
---------
This should be more easy, since the compiled executables are distributed also.
Install the lise directory on your harddisk and assign the logical device
LISE: to this directory. After checking the graphic primitives
(point 100 100 -crf 20; ash *.spc -v) try to adjust the printer driver in
Aux_Config. If the TekAmiga window doesn't come up check the lise: device.
Compiling of individual programms can be done using the >mklise.sh< script
(cshell script)
The TekAmiga programm must be compiled using the >mktek.sh< script. You also
will need the >mdllib.o< for the menu and requester generation.
The whole set of programms can be compiled using the >mkall.sh< script.
LISE was originally develloped for manx-C. It should compile also under
SAS-C or Gnu-C. All programms under >fit< were compiled using SAS-C,
since SAS generated faster FP-math code. There is a special script to
start the SAS-C on lise progs with the name "mklclise.sh".
NOTE I have put a "view only" version of our Multi Channel Analyser programm
MCAah on some distribution disks. This can only be used as spectra display program.
Select >load demo< from the >extras< menu to load a spectrum. Loading of
hardware drivers has been disabled. If you need such a programm, you can ask me
for license conditions. There is also a pure PD Version available from UGA,
which is fully functional on loading handlers, but is an older Version with
some small bugs and less features.
Update to this:
Since the guy who should build the Amiga MCA plug in card does not
come up with this, I put the full version we use in our experiments
in this distribution. It is now possible to add your own hardware
drivers to MCAah. If you need a special version for SPA-LEED/MEED
(Hardware support for the Snapshot from Dizemann) you may ask me
separately. The sources to MCAah are not included !
IV. Customizing Aux_Config
--------------------------
Before you start working with LISE you may need to configure
$LISEPRG/Aux_Config (LISE:Aux_Config).
If you don't have access to the /src directory, you have to
copy Aux_Config to your local HOME directory and make the
modifications local. A local Aux_Config will supersede the
global configuration file.
Aux_Config contains all I/O specific dependencies needed by
any LISE program.
Entries start with a colon (:) followed by an Identifier
The Entry is finished with a hash (#) in the first column.
In the public release of LISE only the Graphical I/O is
controlled by Aux_Config. It defines the Names of the
Graphical communication files, the fonts and Printerdrivers.
Each graphical LISE window has an Entry ":gfx0" .. ":gfxn"
The Line containing the communication file may contain a
"commercial at" (@) to make this file private to a local user.
This will typically be done in the first entry. Actually it
generates a pipe with the user name appended to enable
multible users at the same time to use a window 0.
You may also change the primary and secondary font as you like.
The x-size and y-size of each font may be changed separately
in the lines following the font name.
Also the size of the vector buffer for the tekdaemon is
now customizable in Aux_Config. There are some reasons for
changing the predefined values:
1. You use the "circle" mode display on large spectra or a lot of text
and the hardcopy doesn't draw the spectrum completely.
=> increase the Vectorbuffer of the Window you use.
2. Your system is low on memory (especialy Amiga systems with
"only" 4 MB fast RAM) and you have too much swapping or
crashes on the Amiga.
=> decrease the Vectorbuffer and allow only the first Window
to buffer its vectors. As a consequence of this, the Tekamiga
windows do not redraw theier contents on window resize.
3. You want to have all Tekamiga windows with hardcopy option.
=> give a non 0 buffersize to these windows (~256000)
4. There is also a possibility to specify a file name instead of
a buffersize. In this case the file will be used as vector buffer.
You should not expect this to be fast, but it gives you the chance
to make high quality pictures even on small machines.
The most prominent candidate for customizing is the Printerdriver.
The last entry in each gfx definition contains the name of a
printerdriver, which will be defined later in Aux_Config.
There are mainly two different types of printerdrivers available:
1. Pixel oriented printers (Epson and HP styles are supported)
2. Vector oriented printers / plotters
There are some example entries which should guide you in
designing an entry for your printer.
Here follows a description of the example entry for the Epson style
Printer:
:EpsonX
PAR: ; Output goes to this port. On UNIX systems this could look
like "/dev/lpraw".
You may also specify a real file (e.g. "/usr/tmp/liseprt")
and print this file later with a special command.
echo PRINTER error >/dev/syscon ; A command to execute on
the occurence of a printer trouble. Up to now ignored
PRINTER error ; message to be printed in the event of an error
Up to now ignored.
nil: ; file to print error message on. Up to now ignored
IGNORE ; optional system command after printing. This option is usefull
for networking in conjuction with writing output
to a file instead of a device.
The keyword IGNORE prevents execution of a command.
Amiga batch files must be called with "execute myfile".
3 ; number of passes (only needed for Epson style printers)
1 ; key number for the printer driver:
0 = number of dot image characters msb lsb
1 = number of dot image characters lsb msb
2 = HP raster mode Portrait
3 = HP raster mode Landscape
10 = postscript mode
11 = hpgl mode
1800 ; x_size of printer or scaling factor
800 ; y_size of printer or scaling factor
\x1B@ ; printer initialize
sent at the beginning
\x1BL ; printer double density grafic
sent before each row of raster grafic
\x1B3\x01\n ; initiate half dot line feed
sent after a normal raster row.
Must match to the number of passes.
\x1B3\x15\n ; initiate full line feed
sent after the number of passes have been completed
\x1B@\x0C ; send after printing
#
V. Spectra file format.
------------------------
1) simple ASCII format
This format is implemented to make filetransfer between different systems
more easy. It should not be used as "every day" spectra format.
const char = ' '
int / float spc[max]
The simple ASCII format is identified by the first character being a blank character.
Only the first number must be preceeded by a blank character.
2) complete ASCII spectra format
const char = ['1','2'] 1 for integer
2 for float
int (%d) max number of channels in spectrum
char (%s) s[80] spectrum comment, terminated by LF
float (%E) _tica time calibration factor
int (%d) _spare[4] for future expansion
int (%d) / float (%E) spc[max] data
3) binary spectra format:
const byte = 0 Identifier for binary format
const byte = [0,1,2] 0 for short int (16 bits)
1 for long int (32 bits)
2 for float (32 bits)
short int max number of channels in spectrum
char s[80] spectrum comment (ASCII text)
float _tica time calibration factor
short int _spare[4] for future expansion
float / long / short spc[max] data
4) portability:
binary spectra formats (integer and float since LISE 2.0)
are portable across different computers (this means across
LISE programs on different computers)
The advantage of this feature is, that you can make your
Measurements (for example) on a HP-UNIX workstation,
can controll this measurement remotely from a SUN and make
some on line analysis via NFS there. At evening you may take your
spectra on an IBM formatted Disk, go at home and make the
final analysis (with inclusion of the Data in your favourite DTP)
on your Amiga.
V. precedence of time calibration factors
-----------------------------------------
In order to have the possibility to produce a non linear x-axis on the
display, the *.tim spectra array is read with the highest priority over all
other time calibration factors.
If no *.tim spectrum is present (this saves diskspace) the time calibration
factor will be taken from a file with the name tica.all, in order to
give you an easy way to change this calibration factor, if you, for example,
find out, that your first time calibration was wrong.
If neither a *.tim file nor the tica.all file are present, the time calibration
is taken from the value stored in the spectrum at generation time.
VII. General structure
-----------------------
-------------------------------
| graphic device or program |
| (graphic Terminal at any |
| port, xterm emulation, |
| advanced graphic program) |
-------------------------------
|
-------------------------------
| tekdaemon server process |
| uses Vector Fonts and |
| holds buffer for hardcopy. |-------------------------------------------|
| Communication via named | |
| pipe (UNIX) or direct calls | |
| (Amiga) | |
------------------------------- |
| |
------------------------------- ------------------------------ |
| Unix command shell (Ksh) | | LISE Software pool, | |
| or Arexx, or Any shell you |--| User defined functions, |-----------|
| like | | Hardware controll tasks | |
------------------------------- ------------------------------ |
| | |
------------------------------- ------------------------------ |
| Graphic user interface | | Communication of programs | |
| For UNIX and Amiga the | | via files on Disk (spectra | |
| MDL was develloped to | | files), unix style pipes | |
| provide a common Interface. | | and command line parameters| |
------------------------------- ------------------------------ |
---------------------------------- |
| Hardware description file | |
| Aux_Config | |
| (global at /src/lise or local |---
| at $HOME) |
| contains device names and error|
| handlers and specific info. |
----------------------------------
VIII. Vector Fonts and Text Metacharacters
-------------------------------------------
a. Vector Font format
New to LISE 2.0 are the Hershey Vector fonts
They are stored in the same format which is used by the
Borland compilers (Turbo C, Turbo Pascal), to enable
easy exchange and enhancement of fonts.
Supplied Fonts:
fonts/trip.chr : font with "serifen"
fonts/sans.chr : font without "serifen"
fonts/litt.chr : small font
fonts/goth.chr : Old English Gothic
fonts/symb.chr : mathematical symbols
fonts/scri.chr : Handwriting style
b. Meta Characters
LISE Metacharacters are introduced with a Backslash.
Since your shell may also interprete the Backslash
as another Metacharacter you may have to write
TWO Backslashes (\\) in order to pass the Metacharacter
to any LISE program. The most prominent candidate for
such an operation will be the TPO command, which types
a text at a specified Origin.
defined Metacharacters:
\\ is the Backslash (of course)
\u "up" move to Superscript
\d "down" move to Subscript
\1 select primary font
\2 select secondary font (the Mathematical Symbol font)
\b backspace one (non proportional) character
\0 deactivate proportional mode
c. Aux_Config Entry for Tekdaemon/TekAmiga
You may now specify fonts and printerdriver for each
LISE window separately in the Aux_Config file. The format
is for each window GFXn:
1. Communication file
2. primary font file
3. initial x size
4. initial y size
5. secondary font file
6. initial x size
7. initial y size
8. Size of Vector Buffer in bytes
9. Printer driver for Hardcopy as defined later in Aux_Config
IX. Description of routines:
----------------------------
a. graphic primitives
pag clear grafic window
------- standard spectra options:
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
vect draw a vector on the grafic screen
------- vect x y [x2 y2] [options]
standard spectra options:
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
point plot a point on the grafic screen
-------- point x y [options]
options:
-v draws vectors
-c draws circles
-cir n draws circles with radius n.m
-crf n draws filled circles with radius n
-tri n draws triangles with baseline n (negative n gives
inverted triangles)
-trf n draws filled triangles with baseline n
-qua n draws quadrates with baseline n
-qaf n draws filled quadrates with baseline n
standard spectra options:
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
tpo print text on the grafic screen
------- tpo x y [options] -t text
options:
-w n gives angle in degree
-xs n sets size of characters (integers)
-ys n sets size of characters (integers)
-xt n sets repetition (thicknes) for x
-yt n sets repetition (thicknes) for y
-font name sets fontname
-c n sets paper and ink colour
standard spectra options:
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
!!! NOTE !!! DON'T FORGET THE "-t" BEFORE YOUR TEXT STARTS !!!
rmtek
--------
hco hco [-out drivername] [-iff filename] [-hpgl filename] [-ps filename]
------- make hardcopy of LISE picture
options:
-out string sets another printer driver
-iff filename print Amiga IFF (bitmap) output to file
-hpgl filename print HP-GL output to file
-ps filename print PostScript output to file
-bold make all lines twice as thick
standard spectra options:
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
b. spectra analysis
stype use this utility to convert spectra types
-------- options:
-i (Integer ASCII output),
-r (float ASCII output),
-i2 (short integer binary),
-i4 (long integer binary),
-r4 (float binary, !! NOT PORTABLE !! yet),
-wsimple (write ASCII simple spectrum)
-o name (output goes to files [.spc and .err] and not to stdout)
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
ash Draw a spectrum with axis
------- possible parameters:
ash sp[1:1024] {-y 0} {+y 1000} {-b} {-v} {-c}
sp[min:max] specifies spectrum name and range (default is stdin)
-y n.m specifies the lower bound
+y n.m specifies the upper bound
-x n.m specifies starting x
+x n.m specifies last x
-bnmr leaves space between axis and first/last point
-lx logarithmic x-scale
-ly logarithmic y-scale
-d display only (don't draw axis)
-grid draw a grid
-zero draw a horizontal line at y=0
-xn don't print x-axis numbers
-yn don't print y-axis numbers
-cn don't print comment
-rx reverse x numbering
-ry reverse y numbering
-xi x-axis numbers are integers
-yi y-axis numbers are integers
-xf x-axis numbers in format a.b
-yf y-axis numbers in format a.b
-xe x-axis numbers in format a.bEn
-ye y-axis numbers in format a.bEn
-x% cfmt x-axis numbers in FLOAT C format cfmt (needs additional %)
-y% cfmt y-axis numbers in FLOAT C format cfmt (needs additional %)
-x2 only print every second x number
-pag clear screen before drawing
-use use old parameters
-cur prints cursor position after drawing
-b draws error bars \
-v draws vectors - default is point only
-c draws circles /
-cir n draws circles with radius n.m
-crf n draws filled circles with radius n
-tri n draws triangles with baseline n (negative n gives
inverted triangles)
-trf n draws filled triangles with baseline n
-qua n draws quadrates with baseline n
-qaf n draws filled quadrates with baseline n
-mb n defines bottom margin
-mt n defines top margin
-mr n defines right margin
-ml n defines left margin
standard spectra options:
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
cur
------ options:
+tek prints tektronix hardware coordinates (debugging)
-xy do NOT print time (in ns) and peak height
-xc do NOT print channel number (recalculated !)
-x only returns channel number (usefull for script files)
-y only returns peakheight (usefull for script files)
standard spectra options:
-h (call help routine)
-help (call help routine)
-p n (sets grafic pipe number)
-n (n=0..6 specifies a subwindow)
tcal time calibration:
------- tcal file [options]
prints time difference between channels
options:
-t n.m set time difference between two peaks
-y n set minimum height for peaks
-mean set minimum height for peaks to arithmetic mean of spectrum
-diff set minimum difference between peaks
-peak print peak positions
-quiet don't print anything (output goes to tica.all)
fprompt Take an 8K spectrum and find the maxima (peaks)
----------- for each single spectrum. This method (simple
maximum) is rather crude, so that you should
have a look at your spectra anyway.
options and theier meaning:
-range number
specifies length of single spectrum.
is ignored when specifying a spectra
definition file, but overwrites the
value from global.def.
-dev number
specifies a maximum deviation of the prompt
peak from 2**n value.
-get filename
read spectra definition file instead of global.def
-def filename
redirects output to file rather than
global.def
Format of spectra definition file global.def:
this file consists of 4 entrys for each spectrum
and has as many lines as spectra were present.
The entrys are:
prompt phase first last
| | | |
| | | |---- last channel containing
| | | usable data
| | |
| | |---- first channel containing
| | usable data
| |
| |---- 1 for 0 degree spectrum
| 2 for 90 degree spectrum
| negative when mirrored
|
|---- position of prompt peak
four Fast fourier transformation from input spectrum
------- The resulting spectrum is allready a power spectrum
options and theier meaning:
-iv inverse spectrum
-rf name save real part to file
-if name save imaginary part to file
-pc n append n peaks to comment
-pp n print n peaks to stdout
-s suppress printing of powerspectrum to stdout
pacsplit Takes one 8K spectrum, splits it into single spectra
------------ as defined in global.def (or any file supplied)
and adds corresponding files together.
If the parity of the spectrum was defined negative,
the spectrum is reversed when adding to the others.
AFTER calulation of the sum spectra USP1 and USP2
the errorbars are calculated using
USP1.err = sqrt(USP1.spc);
USP2.err = sqrt(USP2.spc);
options and theier meaning:
-o1 spectrum
defines output other than USP1
-o2 spectrum
defines output other than USP2
-def filename
read spectra definition from file other
than global.def
Format of spectra definition file global.def:
this file consists of 4 entrys for each spectrum
and has as many lines as spectra were present.
The entrys are:
prompt phase first last
| | | |
| | | |---- last channel containing
| | | usable data
| | |
| | |---- first channel containing
| | usable data
| |
| |---- 1 for 0 degree spectrum
| 2 for 90 degree spectrum
| negative when mirrored
|
|---- position of prompt peak
rvt calculating the ratio function
------- rvt = (a*usp1 - b*usp2) / (a*usp1 + b*usp2)
of two spectra files.
Input is read from USP1.spc and USP2.spc.
The errorbars are calculated from the Spectra:
err = sqrt(usp1 + usp2)/(usp1 + usp2)
Before the normalizing factors a and b are calculated,
the Background is subtracted.
The default method for finding an appropriate background
is, to try linearization of the exponential decay
in USP1 and USP2. For different background values
a chi**2 is calculated after linear regression with
the logarithm of the resulting spectrum.
the value with the best chi**2 fit is taken as background.
options and theier meaning:
-s1 spectrum
read 0 degree spectrum other than USP1
-s2 spectrum
read 90 degree spectrum other than USP2
-ba1 value
set background for 0 degree spectrum.
(if ba2 is not specified, it is set to ba1)
No fit is made afterwards.
-ba2 value
set background fo 90 degree spectrum.
(if ba1 was not specified, it is set to ba2)
No fit is made afterwards.
-last number
sets the background to the arithmetic
mean of the last number channels.
Very crude method, but it saves time,
when running on a pure (poor) 68000 Amiga
-v
If you are going to be nervous when the
background fit runs, you may try this option.
It also will tell you the background values,
so that you might verify them, or use them
for OTTO.
rvt2 Splitting spectrum file into single spectra, possibly reversing
------- them, subtracting Background
Calculating PAC Ratio function:
1/4
2 (product(Si(180,t) - BACKi))
R(t) = - * --------------------------------- - 1
3 (product(Sj(90,t) - BACKj))^(1/4)
1 2 [ 1
Error(t) = ------ * - * [-- * sum(1/(Si(180,t)-BACKi)) +
R(t)+1 3 [16
1/2
1 ]
+ -- * sum(1/(Sj(180,t)-BACKj)) ]
16 ]
RVT2 file [-o file] [-back n] [-last n]
options:
-o file output spectrum instead of stdout
-back n background for all spectra
-last n takes arithmetic mean of last n channels as
background. Default is, to find the background
by fitting an exponential curve to the spectrum
-v ves fitted background
The definition of the spectrum is read from global.def
This file should be in a format as generated by the FPROMPT
routine and is organized as follows:
Each line consists of 4 integers.
The first specifies the Time 0 position.
The second can be +1 -1 +2 or -2 and specifies, if it is
to be mirrored (-) and if it is a 0 degree (1)
or 90 degree (2) spectrum
If any other number is given, the spectrum is ignored
The last two numbers are used to specify the range
of the usable data area. Up to now, these parameters
are only significant in the last line !
linfit Linear or Polynomial Fit to Data.
--------- Highest possible order: 10
LinFIT [-in file] [-o file] [-dif file] [-v] [-poly n]
options:
-in filename reads data from spectrum file
-o filename output calculated fitcurve to spectrum file
-dif filename diferentiate fitcurve and write data to spectrum
-v verbouse: prints out resulting coeffitients
-poly n calculate polynom of order n (default is 3)
-cexp n.m calculate critical exponent for Tc = n.m
Formula: y = a * (Tc - x) ^b
if Tc is set to 0, x is assumed to be (Tc - T)
-nexp n.m calculate normal exponential curve for Background n.m
Formula: y = a * x ^b + n.m
standard spectra options:
-i (Integer ASCII output),
-r (float ASCII output),
-i2 (short integer binary),
-i4 (long integer binary),
-r4 (float binary, !! NOT PORTABLE !! yet),
-o name (output goes to files [.spc and .err] and not to stdout)
-h (call help routine)
-help (call help routine)
c. spectra manipulation
genspc
--------- generate spectrum
genspc sp[{i:j}] {-lin a b} {-sin a b c} {-exp a b c}
contrary to the normal behaviour, the WHOLE spectrum (and corresponding
error array) is stored back
-t generate timespectrum only.
-e generate errorspectrum only.
-m n maximum of n elements
-sin a b c for all n: spc(n) = a*sin(b*n+c))
-exp a b c for all n: spc(n) = a+b*exp(c*n)
-lin a b for all n: spc(n) = a+n*b
mspc modify spectrum
------- mspc sp{[i:j]} n1 n2 ... {-sin} {-cos} {-exp} {-ln} {-sqr} {-sqrt} {-abs}
{-s n} {-d n} {-p n} {-q n}
the contents of sp is modified starting from i, ending with j.
contrary to the normal behaviour, the WHOLE spectrum (and corresponding
error array) is stored back
If n1 n2 ... is specified, then sp[i:j] is set to the constant values
with the last one repeated up to j.
other operations:
-f use as Filter (do not write back)
-c text change comment only.
-tica n.m change time calibration for this file
-t modify timespectrum only.
-e modify errorspectrum only.
-sin for all n: spc(n) = sin(spc(n))
-cos for all n: spc(n) = cos(spc(n))
-exp for all n: spc(n) = exp(spc(n))
-ln for all n: spc(n) = log(spc(n))
-sqr for all n: spc(n) = spc(n)*spc(n)
-sqrt for all n: spc(n) = sqrt(spc(n))
-abs for all n: spc(n) = fabs(spc(n))
-int for all n: spc(n) = floor(spc(n))
-lin for all n: spc(n) = n
-mir for all n: spc(n) = spc(max-n), modifies error array too
-add x for all n: spc(n) = spc(n) + x
-sub x for all n: spc(n) = spc(n) - x
-mul x for all n: spc(n) = spc(n) * x
-div x for all n: spc(n) = spc(n) / x
-sr x for all n: spc(n+x) = spc(n) (shift right)
-srt x for all n: spc(n+x) = spc(n) (shift right, including time)
-sl x for all n: spc(n) = spc(n+x) (shift left)
-slt x for all n: spc(n) = spc(n+x) (shift left, including time)
-com x compress spectra, modifying error and timearrays too
-bel x smoothly cut spectrum after x, modifies error array too
instead of numbers, other spectra arrays may be specified.
these spectra arrays are taken starting from the first element.
ONLY ONE OPERATION CAN BE PERFORMED AT A TIME !
!!! NOTE !!! It may be necessary to specify a range for operation
right: mspc myspc[0:1023] -mir
wrong: mspc myspc -mir
ccalc Scientiffic number calculator
-------- Call convention:
ccalc formula
or
ccalc "formula"
The floating point calculator (by Christoph Bohlen).
Output goes to standard output
!!! Warning !!! DON'T use a "*" for multiplication without preceeding the
"*" by an backslash (\*).
Alternatively, you may enclose the whole formula in double qoutes to
prevent the shell from expanding the "*"
scalc Spectra Calculator
-------- Call convention:
scalc [newspc =] formula(function .. number .. spectrum ..)
If no output spectrum is specified, only the first element is
printed on standard output.
Outputspectrum can be specified with a range.
If outputspec allready exists, only the specified part will
be substituted by the result of the calculation.
No calculation will be done with the error and time arrays
Possible function:
exp(expression)
log(expression)
log10(expression)
sin(expression)
cos(expression)
tan(expression)
asin(expression)
acos(expression)
atan(expression)
sinh(expression)
cosh(expression)
tanh(expression)
sqrt(expression)
rnd() returns a random number between 0 and 1
lin() for(n=1;n<_MAXSPCLEN;n++) spc[n] = n;
sum(spc) for(n=1;n<_MAXSPCLEN;n++) sum = sum + spc[n];
pi() for(n=1;n<_MAXSPCLEN;n++) spc[n] = 3.1415927
Operators are +,-,*,/ and ^
-h (call help routine)
-help (call help routine)
!!! NOTES !!! THERE MUST BE NO BLANK CHARACTER LEFT AND RIGHT FROM
THE "=" OPERATOR !!!
right: scalc "out=in1+in2"
wrong: scalc "out = in1 + in2"
IF THE DESTINATION SPECTRUM DOES NOT EXIST YOU MUST
SPECIFY A RANGE TO TELL SCALC THE SIZE OF THE RESULTING
SPECTRUM.
right: scalc "out[0:100]=lin"
wrong: scalc "out=lin"
lbn changing the time calibration factors of all spectra specified
------- Abbreviation stands for: Late is Better than Never
Call like
lbn 0.03456 *.err *.spc
d. miscellaneous
tekdaemonhp
---------------
tekamiga this program opens a graphic window and makes the rastport public
----------- -p n specifies a number for the pipe.
-buf n change size of þvector buffer(used for hardcopy)
You may also specify a file !
-nohco display only, no buffer for hardcopy
-paper n specifies background colour
-ink n specifies drawing colour
-left n left edge
-top n top edge
-xsize n horizontal size
-ysize n vertical size
vka
------
halderserv
--------------
mca
------
MCAah Look at special Documentation for MCAah
--------
auger This program is used to communicate with the Auger Spectrometer
-------- via the SR510 Lock in amplifier
auger [options]
possible options:
-rs read setup (to auger.set)
-us use setup (restore from auger.set)
-scan scan one spectrum and store result to stdout
use option -o to redirect output to a file
-delay n use n ms delay between steps. Default is 100
-step n.m stepwith n.m V Default is 0.010000
-start n.m start voltage [V] Default is 0.000000
-estart n.m start energy [eV]
-stop n.m stop voltage [V] Default is 5.000000
-estop n.m end energy [eV]
-cal n.m calibration factor in eV/V Default is 85.051555
-comment str set comment
-notim do not append time to comment
if there is a file >ecal.auger<, this is taken for energy calibration
see also Aux_Config :auger
anaaug anaaug spectrumfile [-cal n.m]
---------- analyse auger spectrum using peakpositions and
peak intensities
-cal n.m specifies a alternate energy calibration
-table filename uses a custom table for elements
-find list give a list of elements to search for
-nel n sets number of elements which contribute
-dev n.m sets maximum deviation between energy from
table and energy found by peak finder.
default is 0.100000
augcal augcal spectrumfile [-chan n] [-cur] -energy n.m
---------- change energy calibration of specified file
-chan n specify channel
-cur use cursor to select the channel
-energy n.m set energy of peak
-line Xx use auger energy of element Xx as energy
-auto Xx perform auto calibration for element Xx
-table filename uses a custom table for elements
-v verbose: print out calibration factor
cio CIO Spectra conversion between LISE and CESSNA (OTTO) Format
------- Call convention:
cio [*.spc] [-l2o cessnafile] [-o2l cessnafile] [-swap] [-o filename]
options and theier meaning:
-l2o name LISE -> OTTO reads a number of files (*.spc) and
converts them into CESSNA format; writes to file 'name'
-o2l name OTTO -> LISE read CESSNA 'name', extracts the spectrum
supplied as first parameter and generates a LISE spectrum
-list name list spectra in CESSNA file name
-swap is for integer conversion (680x0<->VAX)
-o name may be specified to redirect output of LISE spectra
!!! NOTES !!! YOU SHOULD NEVER FORGET THE "-swap" OPTION !!!
conversion is limited to Integer and a maximum of 25
spectra !!!
plotio Amiga Multiplot conversion program
-------- Call convention:
plotio spectrum [-l2p] [-p2l]
converts spectra from LISE to MULTIPLOT and vice versa
options:
-l2p convert from LISE to MULTIPLOT
-p2l convert from MULTIPLOT to LISE
jcampio JCAMP conversion program
--------- Call convention:
jcampio spectrum [-l2j] [-j2l]
converts spectra from LISE to JCAMP and vice versa
options:
-l2j convert from LISE to JCAMP
-j2l convert from JCAMP to LISE
!!! NOTE !!! This routine is a "Quick Hack" at the moment !!!
e. general multiparameter fit
The general multiparameter fit was designed to be easyly expandable.
You can write your own fitroutines as independend c-programms, which
will be called from disk by the fitroutine at execution time (commonly
named fitfn*.c).
The fit routine takes input parameters from a file and writes the
fit results to a similar file (commonly with the name *.prm).
Without any graphical user interface, this is not easy to handle.
The MDL script "xfit.mdl" makes things much easyer, but you need
OSF-Motif and an X-Window Terminal to run xfit.mdl.
The programm "read_table" is only used from "xfit.mdl" to support
reading of the fit parameter files
fit fit [Spectrum] -t ParameterTable [-f ResultTable]
------- [-o Curve] [-c tica] [-e error] [-v]
parameters:
-o specify output spectrum name for fit curve
-t specify file containing parameter table
-f specify file for the resulting parameter table
-c generate theory curve, do not fit spectrum, use tica
-e use absolute error for theory curve
-v verbose: print fit progress
The parameterfile which must be supplied after
the '-t' option has the following format:
1 functionname ; discussed later
2 epsilon maxiter dchi2 ; default: 0.0003 10 1.0
3 first ; first channel to be fitted
4 last ; last channel to be fitted
5 1st [+- error] (x) ; first parameter (const back.)
6 2nd [+- error] (x) ; second parameter (linear back.)
7 3rd [+- error] (x) ; third parameter (quad. back.)
8 4th [+- error] (x) ; fourth parameter (?)
.
.
.
The optional 'x' or 'X' identifies the parameters
which are to be fitted. All other parameters are
treated as constants.
Any number behind the keyword '+-' is ignored on input
and is used as output only.
As fit result, a similar table is printed,
which can be used as input again.
You may also specify an outputfile for the fitted
curve using the '-o' option.
Fit Functions:
Fit functions are implemented as external programms
which will receive the following parameters:
1. address of an array (float) of x-values.
(or shared memory ID in UNIX)
2. address of array (float) of results.
(or shared memory ID in UNIX)
3. first array element
4. last array element
5. size of array in bytes (used for shmat() under UNIX !)
6. 1st parameter (float)
7. 2nd parameter (float)
.
.
.
26. last parameter (if used)
On Amiga Computers the Address represents the
real memory location in decimal format (4292090)
On UNIX Computers this parameter identifies
a shared memory ID. See 'examplefn.c'
On Amiga Computers it is recommended to make
the Fit function resident, since it will be
called very often.
The Fit routine was taken from Bengt Lindgren
examplefn example fit function
------------- f(x) = a * cos(b * x + c)
fitfn4freq fitting 4 frequencies with 1st harmonic and damping
--------------
fitfnexp fitting exponential curve with background
----------- (You should use "expfit" instead !)
fitfnback fitting background with up to quadratical term
------------
fitfnwkk fitting combined interaction (magnetical and electrical field
----------- gradients) for PAC